#!/usr/bin/env bash

PACKAGE=api
IDL_PATH=src/idl/web.yaml
GEN_PATH=src/web/api/web.gen.go

echo "Please Run this script on the root dir, not in scripts dir."

oapi-codegen -package $PACKAGE -o $GEN_PATH -generate "gin,types,spec" $IDL_PATH

echo "Codegen done."